package com.zyf.pattern.strategy.pay.payport;

/**
 * 使用枚举的方式实现策略模式
 * create by yifeng
 */
public enum PayType {
    ALIPAY(new AliPay()),
    WECHAT_PAY(new WechatPay()),
    UNION_PAY(new UnionPay());

    private Payment payment;

    PayType(Payment payment) {
        this.payment = payment;
    }

    public Payment get() {
        return this.payment;
    }

}
